HtmlCoreImageFormatProvider

Properties

Link copied to clipboard

Whether this provider is valid or not.

Functions

Link copied to clipboard
fun createCanvas(width: Int, height: Int): HTMLCanvasElement
Link copied to clipboard
open suspend override fun decode(data: ByteArray): CoreImage

Decodes a data ByteArray into a CoreImage

Link copied to clipboard
Link copied to clipboard
suspend fun decodeURL(url: String): CoreImage
Link copied to clipboard
open suspend override fun encode(image: CoreImage, format: CoreImageFormat, level: Double = 1.0): ByteArray

Encodes a CoreImage into a ByteArray in the specified format (PNG, JPEG, etc.)

Link copied to clipboard
inline fun <T> generateTemporalURLForBytes(bytes: ByteArray, type: String = "image/png", block: (url: String) -> T): T
Link copied to clipboard
Link copied to clipboard
open suspend override fun info(data: ByteArray): CoreImageInfo

Gets the CoreImageInfo of a data ByteArray. Potentially without decoding the pixels.

Link copied to clipboard
Link copied to clipboard
suspend fun loadImage(url: String): HTMLImageElement